<h2>Edit user</h2>
<div class="row">
    <div class="col-md-6">
        <form novalidate name="EditForm" id="edit-form" method="post" action="">
            <input type="hidden" ng-model="user.id" value="{{user._id}}" />
            <div class="form-group">
                <label>Username:</label>
                <input class="form-control" type="text" ng-model="user.username" value="{{user.username}}" required />
            </div>
            <div class="form-group">
                <label>First name:</label>
                <input class="form-control" type="text" ng-model="user.firstName" value="{{user.firstName}}" required />
            </div>
            <div class="form-group">
                <label>Last name:</label>
                <input class="form-control" type="text" ng-model="user.lastName" value="{{user.lastName}}" required />
            </div>
            <div class="form-group">
                <label>Address:</label>
                <input class="form-control" type="text" ng-model="user.address" value="{{user.address}}" />
            </div>
            <button class="btn btn-primary" ng-disabled="AddNewForm.$invalid || isUnchanged(user)" id="add-new-btn" ng-click="update(user)">Update <span class="glyphicon glyphicon-floppy-disk"></span></button>
            <button class="btn btn-danger" ng-click="delete(user)">Delete <span class="glyphicon glyphicon-trash"></span></button>
            <a href="#/" class="btn">Cancel</a>
        </form>
    </div>
</div>